home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_56279.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  42 lines

  1. -- card: 56279 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. In C++, 'new' and 'delete' are operators built into the language.  In TC these are implemented as functions declared in the header 'oops.h', so the following should be placed in any source file using them:
  11.  
  12.     # ifdef        THINK_C
  13.     # include   <oops.h>
  14.     # endif
  15.  
  16. Because of this implementation, TC provides the ability to pass a class name as a (void pointer) function argument*, or assign it to a variable.  This is not allowed in C++.
  17.  
  18. Lastly, TC's 'inherited' keyword** must be avoided in favor of the name of the base class.
  19.  
  20.  
  21.  
  22. -- part contents for background part 7
  23. ----- text -----
  24. 185
  25.  
  26. -- part contents for background part 29
  27. ----- text -----
  28. 6547
  29. 36702
  30.  
  31. -- part contents for background part 27
  32. ----- text -----
  33. Alternative new() function
  34. Calling overridden method
  35.  
  36. -- part contents for background part 20
  37. ----- text -----
  38. Alternative new() function - p209
  39.  
  40. -- part contents for background part 23
  41. ----- text -----
  42. Calling overridden method - p109